function initDefaultSocialButtons()
{
    if (isIeLt7()) // disable social buttons, because they cause errors under IE6-7
    {
        $('.default_social_buttons_block').hide();
        return;
    }

    VK.init({apiId: 3538122});
    VK.Widgets.Like('vkLike', {type: 'mini', height: 20});

    var scriptSources = {
        google: 'https://apis.google.com/js/plusone.js',
        facebook: 'http://connect.facebook.net/en_GB/all.js#xfbml=1'
    };

    var script = document.getElementsByTagName('script')[0];
    var parent = script.parentNode;

    for (var i in scriptSources)
    {
        var scriptElement = document.createElement('script');
        scriptElement.type = 'text/javascript';
        scriptElement.async = true;
        scriptElement.src = scriptSources[i];
        parent.insertBefore(scriptElement, script);
    }
}

function initFancybox()
{
    $('.video_report_link').fancybox({
        'titleShow'         : true,
        'overlayOpacity'    : 0.7,
        'overlayColor'      : '#000',
        'type'              : 'iframe',
        'width'             : 800,
        'height'            : 600
    });

    $('.photo_link').fancybox({
        'titleShow'         : true,
        'overlayOpacity'    : 0.7,
        'overlayColor'      : '#000'
    });
}

function isIeLt7()
{
    var ieV = jQuery.browser.version,
        ie = jQuery.browser.msie;
    return ie && (ieV <= 7);
}
